const adminRoutes = {
  path: '/admin',
  component: () => import('@/views/admin/index.vue'),
  children: [
    {
      path: 'dashboard',
      component: () => import('@/views/admin/dashboard/index.vue'),
      meta: { title: '数据总览', role: ['admin', 'superAdmin'] },
    },
    {
      path: 'lecture-management',
      component: () => import('@/views/admin/lecture-management/index.vue'),
      meta: { title: '讲座管理', role: 'admin' },
    },
    {
      path: 'book-management',
      component: () => import('@/views/admin/book-management/index.vue'),
      meta: { title: '图书管理', role: 'admin' },
    },
    {
      path: 'room-management',
      component: () => import('@/views/admin/room-management/index.vue'),
      meta: { title: '房间管理', role: '' },
    },
    {
      path: 'punishment',
      component: () => import('@/views/admin/punishment/index.vue'),
      meta: { title: '处罚管理', role: '' },
    },
    {
      path: 'user-management',
      component: () => import('@/views/admin/user-management/index.vue'),
      meta: { title: '用户管理', role: 'admin' },
    },
    {
      path: 'operation-log',
      component: () => import('@/views/admin/operation-log/index.vue'),
      meta: { title: '操作日志', role: '' },
    },
    {
      path: 'library-management',
      component: () => import('@/views/super-admin/library-management/index.vue'),
      meta: { title: '图书馆管理', role: 'superAdmin' },
    },
    {
      path: 'library-detail/:id',
      name: 'library-detail',
      component: () => import('@/views/super-admin/library-management/library-detail.vue'),
      meta: { title: '图书馆详情', role: 'superAdmin', hide: true },
    },
    {
      path: 'admin-management',
      component: () => import('@/views/super-admin/admin-management/index.vue'),
      meta: { title: '管理员管理', role: 'superAdmin' },
    },
    {
      path: 'profile',
      component: () => import('@/views/user/profile/index.vue'),
      meta: { title: '个人信息', role: ['admin'] },
    },
  ],
}

export default adminRoutes
